<!DOCTYPE html>
<html>
	<head>
		
		<title></title>
	</head>
	<body>
		<script>
        var arr=[34,"d",3,4,"im","Y"];
		var n=parseInt(arr.length);
		for(var i=0;i<n/2;i++)
		{
			var a=arr[n-1-i];
			arr[n-1-i]=arr[i];
			arr[i]=a;
			
		}
		/* else
		{
		for(var a=0;a<(n-1)/2;a++)
		{
			arr[a]=arr[n-1-a];
		}
		} */
		document.write("倒序存放后的数组：");
		for(var b=0;b<n;b++)
		{
			document.write(arr[b]+",");
		}
		</script>
	</body>
</html>